package com.yiyun.blog.controller;

import com.yiyun.blog.service.LoginService;
import com.yiyun.blog.vo.Result;
import com.yiyun.blog.vo.params.LoginParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Bao
 * @create 2022-03-04-20:20
 */
@RestController
@RequestMapping("register")
public class RegisterController {

    @Autowired
    private LoginService loginService;

    @PostMapping
    public Result register(@RequestBody LoginParam loginParam){

        System.out.println(loginParam);
        //sso 单点登录，后期如果把登录注册功能 提出去（单独的服务，可以独立提供接口服务）
        return loginService.register(loginParam);
    }
}
